<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>日本京都旅游指南 - 1256篇游记</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
  <style>
    :root {
      --primary-color: #e74c3c;
      --secondary-color: #2c3e50;
      --accent-color: #3498db;
    }

    body {
      font-family: 'Microsoft YaHei', sans-serif;
      line-height: 1.6;
      color: #333;
      margin: 0;
      padding: 0;
      background-color: #f5f5f5;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    /* 头部区域 */
    .header {
      position: relative;
      height: 300px;
      overflow: hidden;
      border-radius: 8px;
      margin-bottom: 30px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .header-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      filter: brightness(0.8);
    }

    .header-content {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 30px;
      background: linear-gradient(transparent, rgba(0,0,0,0.7));
      color: white;
    }

    .header-title {
      font-size: 2.5em;
      margin: 0;
      text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }

    .header-subtitle {
      font-size: 1.2em;
      margin: 10px 0 0;
      text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    }

    /* 主要内容区域 */
    .main-content {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-bottom: 30px;
    }

    /* 地图容器 */
    .map-container {
      height: 500px;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    #kyoto-map {
      height: 100%;
      width: 100%;
    }

    /* 游记统计区域 */
    .travel-notes {
      background: white;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .section-title {
      color: var(--secondary-color);
      border-bottom: 2px solid var(--primary-color);
      padding-bottom: 10px;
      margin-top: 0;
    }

    .notes-count {
      font-size: 2em;
      color: var(--primary-color);
      margin: 20px 0;
    }

    .notes-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
    }

    .note-card {
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: transform 0.3s;
    }

    .note-card:hover {
      transform: translateY(-5px);
    }

    .note-image {
      width: 100%;
      height: 120px;
      object-fit: cover;
    }

    .note-title {
      padding: 10px;
      font-size: 0.9em;
      margin: 0;
    }

    /* 热门景点区域 */
    .popular-attractions {
      background: white;
      border-radius: 8px;
      padding: 20px;
      grid-column: span 2;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .attractions-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 15px;
      margin-top: 20px;
    }

    .attraction-card {
      text-align: center;
    }

    .attraction-image {
      width: 100%;
      height: 120px;
      object-fit: cover;
      border-radius: 8px;
    }

    .attraction-name {
      margin-top: 10px;
      font-weight: bold;
    }

    /* 响应式设计 */
    @media (max-width: 768px) {
      .main-content {
        grid-template-columns: 1fr;
      }

      .popular-attractions {
        grid-column: span 1;
      }

      .attractions-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .notes-grid {
        grid-template-columns: 1fr;
      }
    }
  </style>
</head>
<body>
<div class="container">
  <!-- 头部区域 -->
  <div class="header">
    <img src="https://images.unsplash.com/photo-1492571350019-22de08371fd3?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" alt="京都风景" class="header-image">
    <div class="header-content">
      <h1 class="header-title">日本·京都</h1>
      <p class="header-subtitle">千年古都，传统与现代的完美融合</p>
    </div>
  </div>

  <!-- 主要内容区域 -->
  <div class="main-content">
    <!-- 地图区域 -->
    <div class="map-container">
      <div id="kyoto-map"></div>
    </div>

    <!-- 游记统计区域 -->
    <div class="travel-notes">
      <h2 class="section-title">京都游记</h2>
      <div class="notes-count">1256篇游记</div>
      <p>探索来自世界各地旅行者的京都体验</p>

      <div class="notes-grid">
        <div class="note-card">
          <img src="https://images.unsplash.com/photo-1526481280693-3bfa7568e0f3?ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="伏见稻荷大社" class="note-image">
          <h3 class="note-title">伏见稻荷大社的千本鸟居</h3>
        </div>
        <div class="note-card">
          <img src="https://images.unsplash.com/photo-1542051841857-5f90071e7989?ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="岚山竹林" class="note-image">
          <h3 class="note-title">岚山竹林的宁静之美</h3>
        </div>
        <div class="note-card">
          <img src="https://images.unsplash.com/photo-1553826059-7a090c4bd362?ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="金阁寺" class="note-image">
          <h3 class="note-title">金阁寺的金色辉煌</h3>
        </div>
        <div class="note-card">
          <img src="https://images.unsplash.com/photo-1528137871618-79d2761e3fd5?ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=80" alt="清水寺" class="note-image">
          <h3 class="note-title">清水寺的日落时分</h3>
        </div>
      </div>
    </div>

    <!-- 热门景点区域 -->
    <div class="popular-attractions">
      <h2 class="section-title">京都热门景点</h2>
      <div class="attractions-grid">
        <div class="attraction-card">
          <img src="https://images.unsplash.com/photo-1526481280693-3bfa7568e0f3?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="伏见稻荷大社" class="attraction-image">
          <div class="attraction-name">伏见稻荷大社</div>
        </div>
        <div class="attraction-card">
          <img src="https://images.unsplash.com/photo-1553826059-7a090c4bd362?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="金阁寺" class="attraction-image">
          <div class="attraction-name">金阁寺</div>
        </div>
        <div class="attraction-card">
          <img src="https://images.unsplash.com/photo-1528137871618-79d2761e3fd5?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="清水寺" class="attraction-image">
          <div class="attraction-name">清水寺</div>
        </div>
        <div class="attraction-card">
          <img src="https://images.unsplash.com/photo-1542051841857-5f90071e7989?ixlib=rb-1.2.1&auto=format&fit=crop&w=200&q=80" alt="岚山竹林" class="attraction-image">
          <div class="attraction-name">岚山竹林</div>
        </div>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=irsdeZsEvOqJy1F35cBk2HXRNxxVF2JT"></script>
<script>
  // 初始化百度地图
  var map = new BMap.Map("kyoto-map");

  // 设置中心点和缩放级别（京都坐标）
  var point = new BMap.Point(135.7681, 35.0116);
  map.centerAndZoom(point, 13);

  // 启用鼠标滚轮缩放
  map.enableScrollWheelZoom();

  // 添加地图控件
  map.addControl(new BMap.NavigationControl());
  map.addControl(new BMap.ScaleControl());

  // 添加京都热门景点标记
  var attractions = [
    {
      name: "伏见稻荷大社",
      position: new BMap.Point(135.7727, 34.9671),
      description: "以千本鸟居闻名的神社"
    },
    {
      name: "金阁寺",
      position: new BMap.Point(135.7292, 35.0394),
      description: "金光闪闪的著名寺庙"
    },
    {
      name: "清水寺",
      position: new BMap.Point(135.7850, 34.9949),
      description: "京都最古老的寺庙之一"
    },
    {
      name: "岚山竹林",
      position: new BMap.Point(135.6756, 35.0168),
      description: "美丽的竹林小径"
    },
    {
      name: "二条城",
      position: new BMap.Point(135.7482, 35.0142),
      description: "德川幕府的历史遗迹"
    }
  ];

  // 为每个景点添加标记和信息窗口
  attractions.forEach(function(attraction) {
    var marker = new BMap.Marker(attraction.position);
    map.addOverlay(marker);

    var infoWindow = new BMap.InfoWindow(
            `<b>${attraction.name}</b><br>${attraction.description}`
    );

    marker.addEventListener("click", function() {
      map.openInfoWindow(infoWindow, attraction.position);
    });
  });

  // 添加用户当前位置标记（如果允许）
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(
            function(position) {
              var userPoint = new BMap.Point(
                      position.coords.longitude,
                      position.coords.latitude
              );

              var userMarker = new BMap.Marker(userPoint);
              map.addOverlay(userMarker);

              var infoWindow = new BMap.InfoWindow("<b>您的位置</b>");
              map.openInfoWindow(infoWindow, userPoint);
              map.panTo(userPoint);
            },
            function(error) {
              console.log("无法获取位置: ", error);
            }
    );
  }
</script>
</body>
</html>